version: '3'

services:
  app:
    # Using a Dockerfile is optional, but included for completeness.
    build:
      context: ..
      dockerfile: ./.devcontainer/Dockerfile
      args:
        USER_NAME: ${USER_NAME:-vscode}
        USER_GROUP: ${USER_GROUP:-vscode}
        USER_ID: ${USER_ID:-1000}

    # This is where VS Code should expect to find your project's source code and the value of "workspaceFolder" in .devcontainer/devcontainer.json
    # - ..:/workspace:cached
    # Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker-compose for details.
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    # Overrides default command so things don't shut down after the process ends.
    command: /bin/sh -c "while sleep 1000; do :; done"

    # user: vscode

    # Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
    cap_add:
      - SYS_PTRACE
    security_opt:
      - seccomp:unconfined